import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Stack;

public class SymbolTable {
	protected ArrayList<Symbol> symbols;
	protected Stack<String> scopes;
	protected HashMap<String, PrintWriter> pws;
	protected ArrayList<String> tempCodes;
	protected int level = -1;

	public SymbolTable() {
		symbols = new ArrayList<Symbol>(); 
		this.scopes = new Stack<String>();
		this.pws = new HashMap<String, PrintWriter>();
		this.tempCodes = new ArrayList<String>();
	}

	public void setTables(ArrayList<Symbol> symbols) {
		this.symbols = symbols;
	}	

	public ArrayList<Symbol> getTables() {
		return symbols;
	}
	
	public Stack<String> getStack() {
		return this.scopes;
	}
	
	public HashMap<String, PrintWriter> getPWs() {
		return this.pws;
	}

	public ArrayList<String> getTempCodes() {
		return tempCodes;
	}

	public void setTempCodes(ArrayList<String> tempCodes) {
		this.tempCodes = tempCodes;
	}
	
	public void addLevel() {
		this.level += 1;
	}
	
	public void minusLevel() {
		this.level -= 1;
	}
	
	public int getLevel() {
		return this.level;
	}
}
